4.4 Publishing Dynamics AX Services
You
have now created and customized your service; however, external
applications can’t yet consume it. To allow external applications to
consume your service, you need to publish it. Figure 5 gives an overview of the transport technologies that AIF supports out of the box.
Consult the Microsoft Dynamics AX 2009
documentation on TechNet for detailed instructions on how to publish
Dynamics AX services using AIF administration forms through synchronous
WCF Web services or asynchronous transports such as MSMQ, BizTalk
Server, or XML file exchange.
4.5 Configuring Dynamics AX Services
Configuring WCF Parameters
When Dynamics AX services are published as
synchronous WCF Web services, a WCF configuration file (web.config) is
generated. This file is not generated when Dynamics AX services are
published through any of the asynchronous AIF adapters. Note that a
single web.config file contains the WCF configuration for all published
Dynamics AX services.
Be sure to install Windows SDK for Windows Server 2008 before you modify any WCF configuration settings. Always use SvcConfigEditor instead of Notepad or an XML editor. Dynamics AX services published through WCF Web services support three bindings:
basicHttpBinding (used as the default binding when Dynamics AX services are published as WCF Web services)
customBinding (with WS-Addressing)
wsHttpBinding (with WS-Addressing)
Caution
Publishing
Dynamics AX services as WCF Web services introduces additional
dependencies on .NET Framework 3.5, Internet Information Server (IIS)
6.0 or later, and Windows Server 2008. Improper or incomplete
installation of these external dependencies or default configurations
that are inadequate for Dynamics AX services can prevent Dynamics AX
services that have been published through WCF from working properly. |
Configuring AIF Parameters
AIF provides a variety of configuration options
for administrators of Dynamics AX services, including action policies,
data policies, pipeline components, value mappings, and constraints.
Refer to the Microsoft Dynamics AX 2009 Server and Database Administration Guide
for more details about service administration and related concepts,
such as setting up and using AIF endpoints, action policies, and data
policies.
Configuring Access to Services
Security keys protect access to each Dynamics
AX service from external service clients. These security keys represent
an additional security gate that helps guard Dynamics AX from
unauthorized access by external users over the network; these security
keys do not protect data. The existing Dynamics AX data access control
applies in addition to these service security keys. Just as is
recommended for general security in Dynamics AX, you should grant
administrators access to services only when necessary and try to
configure minimal access.
Refer to the Microsoft Dynamics AX 2009
documentation on TechNet for details on how to create and manage
security keys and for detailed instructions on how to protect services
with security keys.
Troubleshooting Tips for Services
When troubleshooting integrations, you can generally start with these two steps:
- The forms Queue Manager, Document History, and Exception Log—all
located under Basic\Periodic\Application Integration Framework—provide
additional information about errors that have occurred during request
processing in Microsoft Dynamics AX.
- The Event Log provides additional information about errors that occurred in external components such as IIS or BizTalk Server.
The Microsoft Dynamics AX AIF blog at http://blogs.msdn.com/aif/.
also offers a good set of troubleshooting tips for AIF. Here’s a sample
of some of the troubleshooting guidance you can find on the AIF blog:
If the AIF administration Services form is empty, click Refresh and wait until the form has been populated.
If a service contract or data object doesn’t reflect changes
you’ve applied to the service (e.g., added service operations or
modified data objects), open the Services form in the Dynamics AX
client, click Refresh, and then click Generate.
If
a service returns error messages related to validation logic, first
verify that your requests messages are well-formed XML and comply with
the expected XML schema definitions. If your request messages don’t use
message headers to override the default settings for message identifier,
target company, source endpoint, or source endpoint user, check the
default values (e.g., the submitting user’s default company, which is
used for the target company).